# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Sub-Info
pkgname=perl-${_realname}
pkgver=0.002
pkgrel=1
pkgdesc="Tool for inspecting subroutines"
arch=('any')
url="https://search.cpan.org/dist/Sub-Info"
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl-Importer')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/E/EX/EXODIST/${_realname}-${pkgver}.tar.gz")
sha256sums=('ea3056d696bdeff21a99d340d5570887d39a8cc47bff23adfc82df6758cdd0ea')

build() {
  cd  "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd  "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd  "${srcdir}/${_realname}-${pkgver}"
  make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"

  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
